package com.xtm.exercise.feign.fallback;

import com.xtm.exercise.feign.DemoFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

import java.util.Collections;

/**
 * @Description: userService 降级工厂
 * @Author: Hzl
 * @Date: 2024-03-25 20:00
 */
@Slf4j
public class UserFeignFallbackFactory implements FallbackFactory<DemoFeign> {

    @Override
    public DemoFeign create (Throwable throwable) {
        return id -> Collections.emptyList();
    }

}
